<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=div, initial-scale=1.0">
    <title>Document</title>
</head>
<style type="text/css">
    [v-cloack]{
        display: none;
    }
</style>
<body>
    <div id="app" v-cloack>
        <h1>当前点击次数:{{count}}</h1>
        <button v-on:click="count++">+</button>
        <button v-on:click="count--">-</button>
        <!-- <button v-on:click="addClick">+</button>
        <button v-on:click="preClick">-</button> -->
    </div>

</body>
<script src="../js/http_cdn.bootcdn.net_ajax_libs_vue_2.6.6_vue.js"></script>
<script>
    new Vue({
        el: "#app",
        data: {
            count: 0
        },
        methods: {
            addClick: function () {
                this.count++;
            },
            preClick: function () {
                this.count--;
            }
        },
    })
</script>

</html>
